package com.yunao.dao;

import com.yunao.entity.AloneReport;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface AlonereportDao extends JpaRepository<AloneReport,Integer> {

    List<AloneReport> findAllByUserIdAndNeedReportNot(Integer userid, String needReport);

    List<AloneReport> findAllByUserIdAndNeedReportNot(Integer userid, String needReport, Pageable pageable);

    String countByUserIdAndName(Integer userId, String name);

    List<AloneReport> findAllByUserId(Integer userId, Pageable pageable);

    List<AloneReport> findAllByNeedReport(String needReport);

    List<AloneReport> findAllByNeedReportAndId(String need, Integer id);
}
